import { ChatOpenAI } from "@langchain/openai";

const apiKey =
  "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";

// const apiKey =
//   "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";

process.env.OPENAI_API_KEY = apiKey;

const llm = new ChatOpenAI({
  model: "qwen/qwen-2-7b-instruct:free",
  baseUrl: "https://openrouter.ai/api/v1",
  apiKey,
  temperature: 0,
});

await llm.invoke("Hello, world!");
